package com.example.drawex;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;

public class XMLView extends View {
	
	
	// p.228
	//
	// AttributeSet 주의!!!!!

	public XMLView(Context context, AttributeSet attr) {
		super(context, attr);
	}
	
	
	@Override
	protected void onDraw(Canvas canvas) {

		Paint grid = new Paint();
		grid.setColor(Color.BLUE);
		
		grid.setAntiAlias(true);
		
		
		Paint rect = new Paint();
		rect.setColor(Color.YELLOW);
		
		// setColor(0xff0000)
		
		rect.setAntiAlias(false);
		
		
		
		canvas.drawLine(20, 60, 200, 60, grid);
		canvas.drawRect(110, 210, 200, 250, rect);
		canvas.drawCircle(300, 400, 70, grid);
		
		super.onDraw(canvas);
	}
	

}
